package com.tuanzi.loan.business.service.statistics.impl;

import com.tuanzi.loan.business.repository.statistics.NewUnionLoginStatRepository;
import com.tuanzi.loan.business.service.statistics.NewUnionLoginStatService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.union.NewUnionLoginStatRequest;
import com.tuanzi.loan.vo.response.statistics.union.NewUnionLoginStatResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * User: liangZongXi
 * Create time: 16:57 2019/9/10
 * Description:
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class NewUnionLoginStatServiceImpl implements NewUnionLoginStatService {

    @Autowired
    private NewUnionLoginStatRepository newUnionLoginStatRepository;

    @Override
    public Page<NewUnionLoginStatResponse> list(PageSearcher<NewUnionLoginStatRequest> pageSearcher) {
        return newUnionLoginStatRepository.totalList(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
    }
}
